package com.qianfeng.smartdevice.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel(description = "菜单数据对象")
public class Menu implements Comparable<Menu> {
  @ApiModelProperty(value = "主键",example = "2")
  private Long id;
  @ApiModelProperty(value = "菜单别名",required = true,example = "添加用户")
  private String name;
  @ApiModelProperty(value = "父菜单ID",required = false,example = "1")
  private Long parentId;
  @ApiModelProperty(value = "访问URL",required = true,example = "/users/users")
  private String url;
  @ApiModelProperty(value = "图标",required = false,example = "icon-list")
  private String icon;
  @ApiModelProperty(value = "权限",required = true,example = "sys:admin:menu")
  private String perms;
  @ApiModelProperty(value = "菜单类型(0无,1父,2子)",required = true,example = "0")
  private long type;
  @ApiModelProperty(value = "排序",required = false,example = "1000")
  private long sort;

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public Long getParentId() {
    return parentId;
  }

  public void setParentId(Long parentId) {
    this.parentId = parentId;
  }

  public String getUrl() {
    return url;
  }

  public void setUrl(String url) {
    this.url = url;
  }

  public String getIcon() {
    return icon;
  }

  public void setIcon(String icon) {
    this.icon = icon;
  }

  public String getPerms() {
    return perms;
  }

  public void setPerms(String perms) {
    this.perms = perms;
  }

  public long getType() {
    return type;
  }

  public void setType(long type) {
    this.type = type;
  }

  public long getSort() {
    return sort;
  }

  public void setSort(long sort) {
    this.sort = sort;
  }

  @Override
  public int compareTo(Menu o) {
    return (int) (id-o.id);
  }
}
